package com.作业.第八章作业.HomeWork13;

public class Student extends Person{
    private int id;

    public Student(String name, int age, String sex, int id) {
        super(name, age, sex);
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String play(){
        return super.play()+"足球";
    }

    public void study(){
        System.out.println("好好学习，天天向上");
    }

    @Override
    public String printinfo() {
        return "学生的信息\n"+super.printinfo()+
                "\nid=" + id +"\n"+"好好学习，天天向上\n"+play()
               ;
    }

    String show(){
        return super.show()+" id ="+id;
    }
}
